<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${naviString}</title>
<link href="${ctx}/commons/styles/themes/blue/styles/style.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/commons/scripts/jquery-ui/themes/redmond/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div align="center">
  <div align="left" style="width:99%">
    <div align="left" class="nav">${naviString}</div>
    <%@ include file="/commons/pages/messages.jsp" %>
    <html-el:form action="/manager/UserPasswd.do">
      <html-el:hidden property="method" value="save" />
      <html-el:hidden property="mod_id" />
      <html-el:hidden property="user_id" />
      <br />
      <table width="100%" border="0" align="left" cellpadding="1" cellspacing="1" class="datagrid">
        <tr>
          <th colspan="2">修改密码</th>
        </tr>
        <tr>
          <td width="15%" class="title_item"><strong>用户名：</strong></td>
          <td width="85%">${hf.map.user_name}</td>
        </tr>
        <tr>
          <td class="title_item"><span style="color: #F00;">*</span><strong>密&nbsp;&nbsp;&nbsp;码：</strong></td>
          <td><html-el:password property="password" styleId="password" maxlength="120" style="width:260px" /></td>
        </tr>
        <tr>
          <td class="title_item">&nbsp;</td>
          <td><html-el:button property="save" value=" 保 存 " styleId="save" styleClass="ui-state-default ui-corner-all" style="cursor:pointer;" />
            &nbsp;
            <html-el:reset value=" 重 填 " styleClass="ui-state-default ui-corner-all" style="cursor:pointer;" onclick="resetUsername()" />
            &nbsp;
            <html-el:button property="back" value=" 返 回 " onclick="history.back();" styleClass="ui-state-default ui-corner-all" style="cursor:pointer;" />
            &nbsp;&nbsp; <span id="loading" style="display:none;"><img src="${ctx}/commons/styles/images/loading.gif" style="vertical-align:middle; margin: 2px;" />数据提交中，请稍候...</span></td>
        </tr>
      </table>
    </html-el:form>
  </div>
</div>
<script type="text/javascript" src="${ctx}/commons/scripts/validator.js"></script>
<script type="text/javascript" src="${ctx}/commons/scripts/jquery.js"></script>
<script type="text/javascript" src="${ctx}/commons/scripts/jquery-ui/ui/minified/jquery-ui.custom.min.js"></script>
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
	initStyle();
	
	$("#password").attr("datatype","Require").attr("msg","密码必须填写");

	var f = document.forms[0];
	$("#save").click(function(){
		if(Validator.Validate(f, 1)) {
			$("#loading").show();
			$("#save").attr("disabled", "true");
			$("#reset").attr("disabled", "true");

			f.submit();
		}
	});
});

function resetUsername(){
	$("#save").removeAttr("disabled"); 
}

function initStyle(){
	$("input[type='text']").css({border: "1px solid #ccc"});
	$("input[type='submit'],input[type='reset'],input[type='button']").css({border: "1px solid"});
	$("input[type='text'][readonly],input[type='password'][readonly],textarea[readonly]").css({color:"#000"});
    $("input[type='text'],input[type='password'],textarea").not("[readonly]").focus(function(){
    	$(this).addClass("row_focus");
    }).blur(function(){
    	$(this).removeClass("row_focus");
    });
    
	$("textarea").each(function(){
		this.onpropertychange = function () {
			if (this.scrollHeight > 16) this.style.posHeight = this.scrollHeight;
		};
	});
}

//]]></script>
</body>
</html>
